package com.leyou.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor//自动生成无参数构造函数
@AllArgsConstructor//自动生成全参数构造函数
public enum ExceptionEnum {

    PRICE_CANNOT_BE_NULL(400, "价格不能为空"),
    CATEGORY_NOT_FOND(404, "商品分类没有查询到"),
    BRAND_NOT_FOUND(404, "品牌不存在"),
    SPEC_GROUP_NOT_FOUND(404, "商品规格组不存在"),
    SPEC_PARAM_NOT_FOUND(404, "商品规格数据不存在"),
    GOODS_NOT_FOUND(404, "商品不存在"),
    BRAND_SAVE_ERROR(500, "新增品牌失败"),
    CATEGORY_BRAND_SAVE_ERROR(500, "新增品牌失败"),
    UPLOAD_FILE_ERROR(500, "文件上传失败"),
    INVALID_FILE_TYPE(400, "无效文件类型"),
    GOODS_SAVE_TYPE(500, "新增商品失败"),
    GOODS_DETAIL_NOT_FOND(500, "商品详情不存在"),
    INVALID_USER_DATA_TYPE(400, "用户数据类型无效"),
    INVALID_VERIFY_CODE(400, "无效验证码"),
    INVALID_USERNAME_PASSWORD(400, "用户名或密码错误"),
    CREATE_TOKEN_ERROR(500, "用户凭证生成失败"),
    UNAUTHORIZED(403, "未授权"),
    ;
    private int code;
    private String msg;
}
